import "./utils/util";
import "./utils/http";
App({
  token: "",
  refresh_token: "",
  onLaunch() {
    this.getToken();
    this.getRtoken();
  },
  getToken() {
    const token = wx.getStorageSync("token");
    console.log(token);
    this.token = token;
  },
  getRtoken() {
    const refresh_token = wx.getStorageSync("refresh_token");
    this.refresh_token = refresh_token;
  },
  setToken(token, refresh_token) {
    token = "Bearer " + token;
    refresh_token = "Bearer " + refresh_token;
    this.token = token;
    this.refresh_token = refresh_token;
    wx.setStorageSync("token", token);
    wx.setStorageSync("refresh_token", refresh_token);
  },
});
